using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.OleDb;
using DTO;

namespace DAO
{
    public class QuiDinhDAO:DataProvider
    {
        public void Sua(QuiDinhDTO qddto)
        {
            OleDbConnection cn = new OleDbConnection();
            cn = KetNoi();
            string sql = "Update QuiDinh Set Ten = ? , QuiDinh = ? Where Ma = ?";
            OleDbCommand cmd = new OleDbCommand(sql, cn);

            cmd.Parameters.Add("@Ten", OleDbType.WChar);
            cmd.Parameters.Add("@QuiDinh", OleDbType.Double);
            
            cmd.Parameters["@Ten"].Value = qddto.Ten;
            cmd.Parameters["@QuiDinh"].Value = qddto.QuiDinh;
           
            cmd.ExecuteNonQuery();
            cn.Close();
        }
    }
}
